home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 May: Tool Chest / Dev.CD May 00 TC.toast / pc / tool chest / development kits / mpw related / dts mpw goodies / markc < prev    next >
Encoding:
Text File  |  1990-09-14  |  1.9 KB  |  69 lines

  1. ##*****************************************************************************
  2. ##
  3. ##  Project Name:    UserScripts
  4. ##     File Name:    MarkC
  5. ##
  6. ##   Description:    Marks C routines in .c files.
  7. ##
  8. ##*****************************************************************************
  9. ##                       A U T H O R   I D E N T I T Y
  10. ##*****************************************************************************
  11. ##
  12. ##    Initials    Name
  13. ##    --------    -----------------------------------------------
  14. ##    GLA            Glenn L. Austin
  15. ##    AGS            Andrew G. Shebanow
  16. ##
  17. ##*****************************************************************************
  18. ##                      R E V I S I O N   H I S T O R Y
  19. ##*****************************************************************************
  20. ##
  21. ##      Date        Time    Author    Description
  22. ##    --------    -----    ------    ---------------------------------------------
  23. ##    09/11/89    11:00    AGS        Removed beep
  24. ##    08/12/89    19:29    GLA        Add marking for C++
  25. ##    07/21/89    12:21    GLA        Beep when I'm done...
  26. ##    07/21/89    12:20    GLA        Check to see if the file really is a C
  27. ##                                file...
  28. ##    07/21/89    11:58    GLA        Don't replace existing marks.
  29. ##    07/21/89    11:55    GLA        Original version
  30. ##
  31. ##*****************************************************************************
  32.  
  33. set exit 0
  34.  
  35. if "{1} " == " "
  36.     echo "### {0} - Missing parameter!"
  37.     echo "### Syntax:  {0} filename"
  38.     exit 1
  39. end
  40.  
  41. set fileName "{1}"
  42.  
  43. if ("{fileName}" =~ /?+.[ch]/) || ("{fileName}" =~ /?+.cp/)
  44. else
  45.     confirm "{fileName} is not a standard C or C++ file.  Continue marking it?"
  46.     if {status} != 0
  47.         exit 2
  48.     end
  49. end
  50.  
  51. target "{fileName}"
  52.  
  53. # mark C++ method routines as well as C routines
  54. find • "{fileName}"
  55. loop
  56.     find /•(pascal[ ∂t]+)*([A-Za-z0-9_]+[ ∂t]+)*[A-Za-z0-9_:~]+∂(?*∂)[¬;]«1»/ "{fileName}"
  57.     if {status} != 0
  58.         break
  59.     end
  60.     find Δ§ "{fileName}"
  61.     find /•(pascal[ ∂t]+)*([A-Za-z0-9_]+[ ∂t]+)*/Δ:Δ/∂(?*∂)[¬;]«1»/ "{fileName}"
  62.     set markName `catenate "{fileName}".§`
  63.     mark -n § "{markName}" "{fileName}"
  64. end
  65.  
  66. close "{fileName}"
  67.  
  68. set exit 1
  69.